#delimit;

use 20161021_Annual_Parameters_w_Var_8814.dta, clear;


replace year=year-1;
keep if year>1990;

replace R_2=round(R_2*100);
format R_2 %3.0f;
gen baseline=(A+B1);
gen falloff=B1 - B1*exp(B2);

twoway connected R_2 year, color("gs2") mlabel(R_2) mlabposition(12) mlabsize(vsmall)
	xtitle("")
	ylabel(30(10)75,  labsize(small) glcolor("gs14") tlc(gs14) format(%3.0f))
	xlabel(1990(2)2014, noticks labsize(small))
	ytitle("Poverty Relief", size(medsmall))
	  graphregion(color("white"))   xscale(lc(gs14)) yscale(lc(gs14))
	xline(1990, lc("gs15")) xline(1993, lc("gs15")) xline(1997, lc("gs15")) xline(2001, lc("gs15")) xline(2003, lc("gs15")) xline(2009, lc("gs15"))
	text(72 1993 "OBRA-93", size(vsmall)) text(72 1997 "PRWOA", size(vsmall)) 
	text(72 2000.5 "EGTRRA", size(vsmall)) text(72 2003.5 "JGTRRA", size(vsmall)) text(72 2009 "ARRA", size(vsmall))
   ;
	
graph save "20161021_R_US_88_12_paper.gph", replace;


twoway connected baseline year, color("gs2") mlabsize(vsmall)
xtitle("")
ylabel(4 "$4,000" 6"$6,000" 8"$8,000" 10 "$10,000",  labsize(small) glcolor("gs14") tlc(gs14) format(%3.0f))
xlabel(1990(2)2014, noticks labsize(small))
ytitle("Baseline Relief", size(medsmall))
	  graphregion(color("white"))   xscale(lc(gs14)) yscale(lc(gs14))
/*|| rspike HI_a_b1 LO_a_b1 year*/
	;
graph save "20161021_a_b1_US_88_12_paper.gph", replace;

twoway connected falloff year, color("gs2") 
xtitle("")
ylabel(0"$0" .25 "$250" .5"$500" .75 "$750" 1"$1,000",  labsize(small) glcolor("gs14") tlc(gs14) format(%3.1f))
xlabel(1990(2)2014,labsize(small) tlc(gs14))
ytitle("Relief Falloff", size(medsmall))
	  graphregion(color("white"))   xscale(lc(gs14)) yscale(lc(gs14))
;

graph save "20161021_B2_US_88_12_paper.gph", replace;
	
	
graph combine "20161021_R_US_88_12_paper.gph" "20161021_a_b1_US_88_12_paper.gph" 
"20161021_B2_US_88_12_paper.gph", rows(3) graphregion(color("white"))  ;

graph display, xsize(10) ysize(12);

graph save "20161012_Combined_R_a_b1_B2_paper.gph",  replace;
	
graph export "20161012_Combined_R_a_b1_B2_paper.pdf",  replace fontface(Helvetica); 





 